<?php
$title = 'Add new Task';
$this->headTitle($title);
?>

<h1><?php echo $this->escapeHtml($title);?></h1>
<?php
$form = $this->form;
$form->setAttribute('action', $this->url('task' , array('action' => 'add')));
$form->get('submit')->setAttribute('value' , 'Add');
$form->prepare();
echo $this->form()->openTag($form);
?>
<section class="add-task">
<dl class="zend_form">
    <dt></dt>
    <dd><?php
        echo $this->formHidden($form->get('id'));
    ?></dd>
    <dt><?php echo $this->formLabel($form->get('title')); ?></dt>
    <dd><?php
    echo $this->formElement($form->get('title'));
    echo $this->formElementErrors($form->get('title'));
    ?></dd>  
    <dt><?php echo $this->formLabel($form->get('completed')); ?></dt>
    <dd><?php
        echo $this->formElement($form->get('completed'));
        echo $this->formElementErrors($form->get('completed'));
        ?></dd>	
    <dd><?php
    echo $this->formElement($form->get('submit'));
    echo $this->formElementErrors($form->get('submit'));
    ?></dd>	
</dl>        
</section>
<?php
echo $this->form()->closeTag($form);
